package org.qiyu.live.account.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.account.interfface.IAccountTokenRPC;
import org.qiyu.live.account.provider.service.IAccountTokenService;

/**
 * @ClassName: AccountTokenRPCImpl
 * @Description: TODO
 * @Author zhangguangyan
 * @Date 2023/08/29/ 20:49:02
 * @Version 1.0
 */
@DubboService
public class AccountTokenRPCImpl implements IAccountTokenRPC {

    @Resource
    private IAccountTokenService iAccountTokenService;
    @Override
    public String createAndSaveLoginToken(Long userId) {
        return iAccountTokenService.createAndSaveLoginToken(userId);
    }

    @Override
    public Long getUserIdByToken(String tokenKey) {
        return iAccountTokenService.getUserIdByToken(tokenKey);
    }
}
